﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="goodsCompanyList.aspx.cs" Inherits="WebSite.admin.product.goodsCompanyList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
       <link href="../css/skin.css" rel="stylesheet" type="text/css" />
    <script src="../js/common.js" type="text/javascript"></script>

         <script language="javascript" type="text/javascript">

             function openWindowTab() {

                 openNewTab( 'GoodsCompanyAdd', 'product/goodsCompany.aspx', '添加新商品', '' );
             }
          
     </script>
</head>
<body>
    <form id="form1" runat="server">


       <ext:PageManager ID="PageManager1" runat="server" />
      <ext:SimpleForm ID="extForm1" runat="server" BodyPadding="5px"   
            EnableBackgroundColor="false" Title="商品列表"  ShowHeader="true" >
              <Items>

            <ext:Panel ID="Panel2" ShowHeader="false"  CssClass="x-form-item" ShowBorder="false" Layout="Column" runat="server">

             <Items>
               <ext:Label ID="Label1"  Width="80px"    runat="server" Text="&nbsp;&nbsp;是否处理："></ext:Label>
             <ext:RadioButtonList ID="rblProcess"  Label="是否处理" runat="server" Width="240px">
               <ext:RadioItem Text="未处理" Selected="true" Value="0" />
               <ext:RadioItem Text="通过审核" Value="1" />
                 <ext:RadioItem Text="未通过审核" Value="2" />
             </ext:RadioButtonList>
                <ext:Label ID="Label2"  Width="80px"    runat="server" Text="&nbsp;&nbsp;"></ext:Label>
            <ext:Label ID="lblKeywords"  Width="60px"    runat="server" Text="&nbsp;&nbsp;关键字："></ext:Label>
            <ext:TextBox runat="server" ID="txtKeywords"   MaxLength="100" Label="关键字" ></ext:TextBox>
                   <ext:Button ID="btnSearch" Text="搜索"  CssClass="mleft mright" runat="server" 
                     OnClick="btnSearch_Click"></ext:Button>

                           <ext:Button ID="btnAddGoods" runat="server" OnClientClick="openWindowTab();"   EnablePostBack="false" Text="添加新商品">  </ext:Button> 

                  </Items>
         </ext:Panel>

     </Items>
     
   </ext:SimpleForm>

         <ext:Grid ID="Grid1" Title="查询结果" PageSize="50" ShowBorder="false"  
           CssClass="x-form-item"  Height="418px"  AllowPaging="true" 
           SortColumn="goodsName" SortDirection="ASC"     
                        OnPageIndexChange="Grid1_PageIndexChange" ShowHeader="False" 
           runat="server" EnableCheckBoxSelect="False"   AllowSorting="true"    IsDatabasePaging="false" 
                        DataKeyNames="goodsId,isProcess" OnSort="Grid1_Sort" 
           EnableRowNumber="True" >

        <Columns>
        
                
          <ext:TemplateField Width="200px"  ColumnID="goodsName" SortField="goodsName" HeaderText="商品名称">
                <ItemTemplate>
                      <a href="#" onclick="openNewTab('GoodsCompanyAdd','product/goodsCompany.aspx?gid=<%# Eval("goodsId") %>','商品编辑','')"; title="编辑"><%# Eval("goodsName")%></a>                    
                </ItemTemplate>
            </ext:TemplateField>
    
           <ext:BoundField Width="100px" ColumnID="goodsPrice" SortField=""  DataField="goodsPrice" DataFormatString="{0}"
                HeaderText="参考零售价" />
         
           <ext:CheckBoxField Width="60px" RenderAsStaticField="true" SortField="isProcess" DataField="isProcess" HeaderText="是否处理" />


                 <ext:TemplateField Width="300px" SortField="processContent" HeaderText="处理信息">
                <ItemTemplate>
                            <div title="<%# Eval("processContent") %>">  <%# Eval("processContent")%></div>

                </ItemTemplate>
            </ext:TemplateField>
          
          <ext:TemplateField Width="80px" SortField="goodsName" HeaderText="操作">
                <ItemTemplate>
                              <a href="goodsCompanyList.aspx?action=del&amp;id=<%# Eval("goodsId") %>" title="移除">[删除]</a>

                </ItemTemplate>
            </ext:TemplateField>
              <ext:WindowField Width="60px" WindowID="Window1" HeaderText="处理" Text="处理"   ToolTip="处理" DataIFrameUrlFields="goodsId"
                                DataIFrameUrlFormatString="/admin/product/goodsCompanyProcess.aspx?gid={0}" Title="处理"
                                IFrameUrl="~/alert.aspx" />
            

        </Columns>
    </ext:Grid>

          <ext:Window ID="Window1" Title="弹出窗体" Popup="false" EnableIFrame="true" IFrameUrl="about:blank"
        Target="Parent" runat="server"   CloseAction="HidePostBack" IsModal="true" Width="550px"
        EnableConfirmOnClose="true"  OnClose="Window1_Close" Height="350px">
    </ext:Window>



    </form>
</body>
</html>
